<?php
    session_start();
    
    ob_start(); // Xoá ký tự đệm đầu trang, dùng để chạy Header("Location: ...");
    
    define("ALLOW", 1);
    
    function __autoload($class_name)
    {
    	include_once('../classes/'.strtolower($class_name).'.php');
    }
    $nguoidung = new nguoidungbs();
    $nguoidung->TenDangNhap = $_SESSION['TenDangNhap'];
    $quyenhan = $nguoidung->InfoUser();
    $_SESSION['TenNguoiDung'] = $quyenhan[0]['HoTen'];
    $_SESSION['MaNguoiDung'] = $quyenhan[0]['MaNguoiDung'];
    $_SESSION['QuyenHan'] = $quyenhan[0]['QuyenHan'];
    header("Location: index.php");
?>